
			
			<div class="container">
				<div class="category-form">
				<div class="page-header" style="position:relative;">
					<h3>Add Category </h3>
				</div>
					<?php echo form_open('category/add','class ="form-horizontal" ', 'id = "category-form"'); ?>
    					<div class="control-group">
							<label class="control-label" for="category_name">Category Name<span style="color: red;">*</span></label>
							<div class="controls">
								<input type="text" name="category_name" id="category_name" value="<?php echo set_value('category_name'); ?>"/>
                                <label class="error"><?php echo form_error('category_name'); ?></label>
							</div>
						</div>
                        <hr />
                        <div class="control-group">
							<label class="control-label" for="parent">Parent</label>
							<div class="controls">
								<select name="parent">
              						<option value="">-- Select Parent --</option>
              						<?php foreach ($categories as $key => $val) { ?>
				    					<option value =<?php echo $val->category_id ?> <?php echo set_select('parent', $val->category_id); ?> > 
                                            <?php echo $val->category_name ?> </option>
				    				<?php } ?>
              					</select>
                                <label class="error"><?php echo form_error('parent'); ?></label>
							</div>
						</div>
                        <hr />
                        <div class="control-group">
							<label class="control-label" for="parent">Status</label>
							<div class="controls">
								<select name="status">
        							<option value="1" selected="selected">Enabled</option>
               						<option value="0">Disabled</option>
            					</select>
                                <label class="error"><?php echo form_error('status'); ?></label>
							</div>
						</div>
                        <hr />
                         <div class="control-group">
							<label class="control-label" for="sort_order">Sort Order</label>
							<div class="controls">
								<input type="text" name="sort_order" id="sort_order" class="input-mini" value="<?php echo set_value('sort_order'); ?>"/> 
                                <label class="error"><?php echo form_error('sort_order'); ?></label>
							</div>
						</div>
                        <div class="form-actions">
 							<input class="btn btn-primary" id="submit" type="submit" value="Save Category" />
							<input class="btn" id="cancel" type="button" name="cancel" value="Cancel" onclick="self.history.back()" />    
                        </div>
					<?php echo form_close(); ?>
				</div>
			</div>

